import Layout from "@/views/layout/index.vue";
export default [{
        path: "/home",
        name: "home",
        meta: {
            title: "首页",
            icon: "icon-panel",
        },
        component: Layout,
        redirect: "/home/index",
        children: [{
                path: "index",
                name: "home-index",
                meta: {
                    title: "仪表盘",
                },
                component: () => import("@/views/home/index.vue"),
            },
            {
                path: "data",
                meta: {
                    title: "设备数据"
                },
                name: "data-view",
                component: () => import("@/views/home/data.vue"),
            },
        ],
    },
    // 设备
    {
        path: "/device",
        name: "device",
        meta: {
            title: "设备",
            icon: "icon-luyouqi",
        },
        component: Layout,
        children: [{
                path: "group",
                meta: {
                    title: "设备群组"
                },
                name: "device-group",
                component: () => import("@/views/device/group.vue"),
            },
            {
                path: "gatway",
                meta: {
                    title: "网关列表"
                },
                name: "device-gatway",
                component: () => import("@/views/device/gatway.vue"),
            },
            {
                path: "sensor",
                meta: {
                    title: "传感器列表"
                },
                name: "device-sensor",
                component: () => import("@/views/device/sensor.vue"),
            },
            {
                path: "developkit",
                meta: {
                    title: "开发套件"
                },
                name: "device-developkit",
                component: () => import("@/views/device/developKit.vue"),
            },
        ],
    },

    // 计费
    {
        path: "/fee",
        name: "fee",
        component: Layout,
        meta: {
            title: "计费",
            icon: "icon-fyxx"
        },
        redirect: "/fee/account",
        children: [{
                path: "account",
                meta: {
                    title: "账户信息"
                },
                name: "fee-account",
                component: () => import("@/views/fee/account.vue"),
            },
            {
                path: "recharge",
                meta: {
                    title: "充值记录"
                },
                name: "fee-recharge",
                component: () => import("@/views/fee/recharge.vue"),
            },
            {
                path: "usege",
                meta: {
                    title: "使用记录"
                },
                name: "fee-usege",
                component: () => import("@/views/fee/usege.vue"),
            },
        ],
    },

    // 自定义类型
    {
        path: "/measure",
        name: "measure",
        component: Layout,
        redirect: "/measure/list",
        meta: {
            title: "测量类型",
            icon: "icon-signal"
        },
        children: [{
            path: "list",
            meta: {
                title: "测量类型列表"
            },
            name: "measure-list",
            component: () => import("@/views/measure/list.vue"),
        }, ],
    },
    {
        path: "/account",
        name: "account",
        component: Layout,
        meta: {
            title: "账号",
            icon: "icon-account"
        },
        children: [{
                path: "add",
                meta: {
                    title: "添加账号"
                },
                name: "account-add",
                component: () => import("@/views/account/addAccount.vue"),
            },
            {
                path: "list",
                meta: {
                    title: "账号列表"
                },
                name: "account-list",
                component: () => import("@/views/account/accountList.vue"),
            },
        ],
    },
    {
        path: "/security",
        name: "security",
        component: Layout,
        meta: {
            title: "安全",
            icon: "icon-anquan"
        },
        redirect: '/security/list',
        children: [{
            path: "list",
            meta: {
                title: "密钥列表"
            },
            name: "security-list",
            component: () => import("@/views/security/list.vue"),
        }, ],
    },
    {
        path: "/demo",
        name: "demo",
        component: Layout,
        meta: {
            title: "demo",
            icon: "icon-d-right-arrow",
        },
        redirect: '/demo/demo1',
        children: [{
            path: "demo1",
            meta: {
                title: "demo1"
            },
            name: "demo-demo1",
            component: () => import("@/views/demo/demo1.vue"),
        }, {
            path: "demo2",
            meta: {
                title: "demo2"
            },
            name: "demo-demo2",
            component: () => import("@/views/demo/demo2.vue"),
        }, ],
    },


];